#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int largestPerimeter(int* nums, int numsSize)
{
    int arr[3];
    for (int i = 0; i < strlen(nums); i++)
    {
        int max = nums[0];
        int min = nums[0];
        int mid = nums[0];

        if (nums[i] >= max)
        {
            max = nums[i];
        }
        if (nums[i] <= min)
        {
            min = nums[0];
        }
        if (nums[i] != min && nums[i] != max)
        {
            mid = nums[i];
        }
    }
    if ((min + mid) > max && (max - mid) < min)
    {
        return (max + mid + min);
    }
    return 0;
}

int main()
{
    return 0;
}